package code

import (
	"gitee.com/xgotool/backend-framework-template/service/captcha"
	"gitee.com/xiaoyutab/xgotool/individual/xginplus"
	"github.com/gin-gonic/gin"
)

// 获取验证码信息
//
//	GET	/code/captcha
func Captcha(c *xginplus.Context) *xginplus.Response {
	id, b64 := captcha.Get()
	return c.Success(gin.H{
		"id":    id,
		"image": b64,
	})
}
